/*
 * @Author: 梓岄 3049738225@qq.com
 * @Date: 2025-11-28 18:20:45
 * @LastEditors: 梓岄 3049738225@qq.com
 * @LastEditTime: 2025-11-28 20:16:55
 * @FilePath: /fifo/Server.cc
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#include "Fifo.hpp"

int main()
{
    Myfifo mf;
    mf.Creat();
    mf.Open(ForRead);

    std::string str;
    int n = 1;
    while (n)
    {
        n = mf.Rcev(str);
        if (n > 0)
        {
            std::cout << str << std::endl;
        }
    }
    n = mf.Delet();
    if(n<0)
    {
        perror("Delete");
        return 1;
    }
    return 0;
}